package commandAction;

import command.CmdDialog;
import command.CmdJFileChooser;
import command.CmdLayerTree;
import command.CmdMap;
import command.CmdMenu;
import command.CmdToolbar;
import command.CmdWorkspaceTree;
import command.Command;


public class ActionFactory {

	private ActionFactory(){
		
	}
	public static Action getActionInstance(Command c){
		if(c instanceof CmdToolbar){
			return new ActionToolbar();
		}
		if(c instanceof CmdDialog){
			return new ActionDialog();
		}
		if(c instanceof CmdWorkspaceTree){
			return new ActionWorkspaceTree();
		}
		if(c instanceof CmdLayerTree){
			return new ActionLayerTree();
		}
		if(c instanceof CmdJFileChooser){
			return new ActionJFileChooser();
		}
		if(c instanceof CmdMap){
			return new ActionMap();
		}
		if(c instanceof CmdMenu){
			return new ActionMenu();
		}
		return null;
	}
}
